import Request from '@/libs/request'

/**用户查询报警历史记录 */
export const uSelectDevReportDataByQueryVo = (
  data: {
    devId?: string | number
    userId: string | number
    startTime?: string
    endTime?: string
    paramCode?: string
    reportCode?: string
  } & Omit<Paging, 'start'>
) => Request.get<PagingResponse<Alarm.TableData>>('/user/uSelectDevReportDataByQueryVo', data)

/**用户查询所有设备报警配置信息 */
export const uSelectWebDevReportConf = (data: { userId: string }) =>
  Request.get<Alarm.DevConfigData[]>('/user/uSelectWebDevReportConf', data)

/**用户修改报警配置 */
export const uEditReportConf = (data: Alarm.EditConfigData) =>
  Request.get<null>('/user/uEditReportConf', data)

/**用户启用报警配置 */
export const uOpenReportConf = (data: { devReportConfId: number }) =>
  Request.get<null>('/user/uOpenReportConf', data)

/**用户停用报警配置 */
export const uDisableReportConf = (data: { devReportConfId: number }) =>
  Request.get<null>('/user/uDisableReportConf', data)
